﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TheDrinksApp.Screen.Order
{
    public partial class IceLemonYNItem : UserControl
    {
        private bool isCheckIce = false;
        private bool isCheckLemon = false;

        public bool IsCheckLemon
        {
            get { return isCheckLemon; }
            set { isCheckLemon = value; }
        }

        public bool IsCheckIce
        {
            get { return isCheckIce; }
            set { isCheckIce = value; }
        }

        public IceLemonYNItem()
        {
            InitializeComponent();
        }
        private void isIce_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            IsCheckIce = !IsCheckIce;
            string imageUrl = (IsCheckIce ? @"/Resources/on.png" : @"/Resources/off.png");
            ImageSourceConverter converter = new ImageSourceConverter();
            isIceImage.Source = (ImageSource)converter.ConvertFromString(imageUrl);
        }

        private void isLemon_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            IsCheckLemon = !IsCheckLemon;
            string imageUrl = (IsCheckLemon ? @"/Resources/on.png" : @"/Resources/off.png");
            ImageSourceConverter converter = new ImageSourceConverter();
            isLemonImage.Source = (ImageSource)converter.ConvertFromString(imageUrl);

        }
    }
}
